Cognitoware.Robotics.dll
Class MarkovActionChain<X, U>
X: The x type.
U: The action type.
Summary
A Markov chain that predicts a x using a x and an action.
Constructor Summary
Method Summary
BayesianInference(X, RandomDistribution<Pair<X>>)
Inherited from Cognitoware.Mathematics.Probability.RandomConditional
Calculates the probability of a transitioning to an end x from a start x by performing a specific action.
Not implemented in MarkovActionChain.
Equals(Object)
Inherited from System.Object
Finalize()
Inherited from System.Object
GetHashCode()
Inherited from System.Object
GetType()
Inherited from System.Object
Not implemented in MarkovActionChain.
Marginalize(DiscreteConditional<Pair<X>>)
Inherited from Cognitoware.Mathematics.Probability.Discrete.DiscreteConditional
Creates a probability distribution of transitioning to an ending x
given a random distribution across starting states and actions.
Factors out the action resulting in a Markov Chain.
Factors out the starting x resulting in a conditional distribution of an ending x given an action.
MemberwiseClone()
Inherited from System.Object
Samples an end x given a start x, action, and random number.
Sets the probability of an action moving from a start x to an end x.
ToString()
Inherited from System.Object
Details
A Markov chain that predicts a x using a x and an action.
This is also the conditional probability P(Xt+1 | Xt, U).
Constructor Details
public MarkovActionChain()
Method Details
public override Double ConditionalProbabilityOf(X end, Pair<X> y)
Calculates the probability of a transitioning to an end x from a start x by performing a specific action.
Parameters:
end
- The end x.
y
- A pair of the start x and an action.
Returns:
The probablity of an ending x given a starting x and an action.
public override RandomDistribution<X> ConditionBy(Pair<X> y)
Implements the abstract method in RandomConditional.
Throws NotImplementedException.
public override RandomDistribution<Pair<X>> LikelihoodOf(X end)
Implements the abstract method in RandomConditional.
Throws NotImplementedException.
public override RandomDistribution<X> Marginalize(RandomDistribution<Pair<X>> startAction)
Creates a probability distribution of transitioning to an ending x
given a random distribution across starting states and actions.
Parameters:
startAction
-
The distribuiton across starting states and actions that is used to weight the probability distributions of X.
Returns:
The expectation of an ending x given the probable values of the starting states and actions.
public MarkovChain<X> Marginalize(RandomDistribution<U> u)
Factors out the action resulting in a Markov Chain giving the conditional distribution of arriving at an ending x from a starting x.
Parameters:
u
- The action to marginalize.
public DiscreteConditional<X> Marginalize(RandomDistribution<X> start)
Factors out the starting x resulting in a conditional distribution of an ending x given an action.
Parameters:
start
- The starting x to factor out of the distribution.
Returns:
The probability of an ending x given an action.
public X Sample(U action, X start, Double p)
Samples an end x given a start x, action, and random number.
The random number should be uniformly selected between zero and one.
Parameters:
action
- The action used to select the end x.
start
- The start x used to select the end x.
p
- The random number used to sample the end x.
public void Set(X end, U action, X start, Double p)
Sets the probability of an action moving from a start x to an end x.
Parameters:
end
- The ending x.
action
- The action.
start
- The starting x.
p
- The probability value.